<extend name="Base/common" />
<block name="Content">
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-file"></i>
            <strong class="am-text-primary am-text-lg">{$userModel['username']}（{$userModel['account']}）优惠券管理</strong>
        </div>
        <hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
   
   <div class="am-u-sm-12 am-u-md-6" style="padding:0px">
       <div class="am-btn-toolbar">
           <div class="am-btn-group am-btn-group-xs">
               <button type="button" class="am-btn am-btn-secondary am-btn-xs" onclick="javascript:history.back(-1);return false;">
                            返回列表
               </button>
           </div>
       </div>
   </div>
   
    <table class="am-table am-table-striped am-table-hover table-main">
        <thead>
            <tr>
                <th class="table-type am-text-left" style="width:20%">
                    优惠券类型
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    面额
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    领取时间
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    使用时间
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    过期时间
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    状态
                </th>
            </tr>
        </thead>
        <tbody>
            <notempty name="list">
                <foreach name="list" item="coupon">
                    <tr>
                        <td>
                            <switch name="coupon.category">
                            	<case value="1">
                            		注册券
                           		</case>
                            	<case value="2">
                            		邀请好友券
                           		</case>
                            	<case value="3">
                            		活动券
                           		</case>
                           	</switch>
                        </td>
                        <td>
                        	<if condition="$coupon.minimum gt 0">
                            	满{$coupon.minimum}元减{$coupon.money}
                            <else/>
                            	{$coupon.money}元
                            </if>
                        </td>
                        <td>
                            {$coupon.create_time|GetDateMk}
                        </td>
                        <td>
                            {$coupon.use_time|GetDateMk}
                        </td>
                        <td>
                            {$coupon.deadline|GetDateMk}
                        </td>
                        <td>
							<switch name="coupon.status">
                            	<case value="1">
                            		未使用
                           		</case>
                            	<case value="2">
                            		已使用
                           		</case>
                            	<case value="3">
                            		过期
                           		</case>
                           	</switch>
                        </td>
                    </tr>
                </foreach>
                <else/>
                <td colspan="9" class="text-center">
                    aOh! 暂时还没有内容!
                </td>
            </notempty>
        </tbody>
    </table>
    <!-- 分页 -->
    <ul class="am-pagination am-pagination-default am-no-layout amz-social">
        {$_page}
    </ul>
    <!-- /分页 -->
</block>
<block name="style">
    <style type="text/css">
        .am-table {
            padding-left: 0px;
            margin-left: 0px
        }
    </style>
</block>
